import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

void drawIsAntiAliasColor(Canvas canvas) {
  Paint paint = Paint();
  canvas.drawCircle(
      const Offset(180, 180),
      170,
      paint
        ..color = Colors.blue
        ..strokeWidth = 5);
  canvas.drawCircle(
      const Offset(180+360, 180),
      170,
      paint
        ..isAntiAlias = false
        ..color = Colors.red);
}

GestureDetector drawCircle(){
  return GestureDetector(
    behavior: HitTestBehavior.opaque,
    onTap: (){
      print("point");
    },
    child: CustomPaint(
      size: Size(30.w, 30.w),
      painter: CirclePainter(),
    ),
  );
}

class CirclePainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    // TODO: implement paint
    Paint paint = Paint();
    canvas.drawCircle(
        const Offset(0, 0),
        8,
        paint
          ..color = Colors.white
          ..strokeWidth = 5);
    canvas.drawCircle(
      const Offset(0, 0),
        5,
        paint..color = Colors.grey
        ..strokeWidth = 2
    );
  }

  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) {
    // TODO: implement shouldRepaint
    return false;
  }

}